Skip to main content
POST
Edit or create an image with FLUX.1 Kontext [max]
FLUX.1 Kontext [max] is a legacy editing model. For new integrations, use FLUX.2 [pro] (/flux-2-pro). See which model to use.

Authorizations

x-key
string
header
required

Body

application/json
prompt
string
required

Text prompt for image generation.

Example:

"ein fantastisches bild"

input_image
string | null

Base64 encoded image or URL to use with Kontext.

input_image_2
string | null

Base64 encoded image or URL to use with Kontext. Experimental Multiref

input_image_3
string | null

Base64 encoded image or URL to use with Kontext. Experimental Multiref

input_image_4
string | null

Base64 encoded image or URL to use with Kontext. Experimental Multiref

seed
integer | null

Optional seed for reproducibility.

Example:

42

aspect_ratio
string | null

Aspect ratio of the image between 21:9 and 9:21

output_format
enum<string> | null
default:png

Output format for the generated image. Can be 'jpeg', 'png', or 'webp'.

Available options:
jpeg,
png,
webp
webhook_url
string<uri> | null

URL to receive webhook notifications

Required string length: 1 - 2083
webhook_secret
string | null

Optional secret for webhook signature verification

prompt_upsampling
boolean
default:false

Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation.

safety_tolerance
integer
default:2

Tolerance level for input and output moderation. Between 0 and 6, 0 being most strict, 6 being least strict.

Required range: 0 <= x <= 6
Example:

2

Response

Successful Response

id
string
required
polling_url
string
required
cost
number | null

Cost in credits for this request

input_mp
number | null

Input megapixels (2 decimal places)

output_mp
number | null

Output megapixels (2 decimal places)